﻿<header>
    <nav class="top">
        <ul>
        @if (IsAuthenticated)
        { 
            <li>@Local("Welcome")：<span onclick="go('@CommonUrls.UCDefaultUrl');" style="color:@Self.DisplayRole.DisplayColor; cursor:pointer;" title="@Self.DisplayRole.RoleName">@Self.NickName</span></li>
            <li>|<a href="@CommonUrls.Logout">@Local("User.Logout")</a></li>
            if (Self.IsAdministrator)
            {
            <li>|<a href="@CommonUrls.CPDefaultUrl">@Local("ControlPanel")</a></li>
            }
            <li>|<a href="javascript:void(0);" onclick="addHomePage('@Settings.SiteUrl');">@Local("SetHomePage")</a></li>
        }
        else if (Settings.AllowLogin)
        {
            <li>@Html.ModalLink("User.Login", CommonUrls.Logon, 300)</li>
            <li>|@Html.ModalLink("User.Register", CommonUrls.Register, 300)</li>
            <li>|<a href="#">@Local("User.Forgot")</a></li>
            <li>|<a href="javascript:void(0);" onclick="addHomePage('@Settings.SiteUrl');">@Local("SetHomePage")</a></li>
        }
        else
        {
            <li><a href="javascript:void(0);" onclick="addHomePage('@Settings.SiteUrl');">@Local("SetHomePage")</a></li>
        }
            <li>|<a href="javascript:void(0);" onclick="addFavorite('@Settings.SiteUrl', '@Settings.SiteName');">@Local("AddFavorite")</a></li>
            <li class="bj"></li>
        </ul>
    </nav>
    <div class="clear"></div>
    <div class="searchbox">
        @using (Html.BeginForm("Search", "Common", FormMethod.Get, new { onsubmit = "return searchCheck();", target = "_blank" }))
        {
        <div class="search">
            <input name="keyword" maxlength="40" type="search" class="sinput" placeholder="请输入要搜索的关键字" />
            <button type="submit" class="blue">@Local("Search")</button>
        </div>
        }
    </div>
</header>
